package com.his.his_system.mapper;

import com.his.his_system.domain.DzmHisCarePaylog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
* @author 覃圣礼
* @description 针对表【dzm_his_care_paylog(支付收费记录)】的数据库操作Mapper
* @createDate 2023-07-07 14:44:29
* @Entity com.his.his_system.domain.DzmHisCarePaylog
*/
public interface DzmHisCarePaylogMapper extends BaseMapper<DzmHisCarePaylog> {

      /**
       * 获取现金收入金额
       */
      @Select("SELECT SUM(pay_amount) FROM  dzm_his_care_paylog where payment_platform=0")
      String getCash();

      /**
       * 获取微信收入金额
       */
      @Select("SELECT SUM(pay_amount) FROM  dzm_his_care_paylog where payment_platform=1")
      String getWeChat();

      /**
       * 获取支付宝收入金额
       */
      @Select("SELECT SUM(pay_amount) FROM  dzm_his_care_paylog where payment_platform=2")
      String getAlipay();

      /**
       * 获取全部费用
       */
      @Select("SELECT SUM(pay_amount) FROM  dzm_his_care_paylog")
      String  lumpSumExpenses();


}




